#pragma once

struct ArgbPixel;

struct ClearTypePixel
{
private:
	union
	{
		__m128i sse;

		struct  
		{
			XUINT32 b:8;
			XUINT32 g:8;
			XUINT32 r:8;
			XUINT32 a:8;
			XUINT32 aa:8;
			XUINT32 ab:8;
			XUINT32 ag:8;
			XUINT32 ar:8;
			XUINT32 tb:8;
			XUINT32 tg:8;
			XUINT32 tr:8;
			XUINT32 ta:8;
		};

		struct
		{
			XUINT32 argb;
			XUINT32 aragabaa;
			XUINT32 tatrtgtb;
		};
		struct
		{
			XUINT64 aragabaaargb;
		};
	};
public:
	union __m128i * SIMD();
	bool operator==(struct ClearTypePixel & r);
	bool operator!=(struct ClearTypePixel & r);
	void SetZero();
	XBOOL IsFullyOpaque();
	XBOOL IsFullyTransparent();
	XBOOL HasLinearAlpha();
	void AssertPremultiplied();
	void SetArgb(struct ArgbPixel _argb);
};
